<?php include_once("DataProvider.php")?>
<?php
                   			$sql="select * from loaisanpham lsp where id_loaisanpham=".$_REQUEST["cateid"];
							$result=DataProvider::ExecuteQuery($sql);
							$menu=mysql_fetch_array($result);
?>
<!doctype html>
<html class="no-js"><!-- InstanceBegin template="/Templates/loaisanpham.dwt.php" codeOutsideHTMLIsLocked="false" -->

	<?php
	include_once("header.php");
	?>
  
		<!-- ENDS HEADER --><!-- InstanceBeginEditable name="EditRegion1" -->
		<!-- MAIN -->
        <div id="main">
          <div class="bannerleft" style=" width:15%; position:fixed;top:450px;"> 
            <img src="img/bannertruot.gif" style="width:100%;"/>
            </div>
            <div class="bannerleft" style=" width:15%; position:fixed; top:450px; right:10px;"> 
            <img src="img/bannertruot.gif" style="width:100%;"/>
            </div>
           <script type="text/javascript">
      $(window).scroll(function(){
        if($(window).scrollTop()==0)
        {
          $('.bannerleft').animate({'top':'450px'});  
        }
        if($(window).scrollTop()>0)
          $('.bannerleft').css({'top':'100px'});
        }
      );
            </script>
          <div class="wrapper cf">
            <!-- portfolio content-->
            <div id="portfolio-content" class="cf">
              <ul id="filter-buttons">
                <li><a href="#" data-filter=".<?php echo $menu["data-filter"];?>"><h4><?php echo $menu["tenloaisanpham"];?></h4></a></li>
              </ul>
              <!-- Filter container -->
              <div id="filter-container" class="cf" style="overflow: hidden; position: relative; width:670px;margin-left:10%;">
                <?php
                   $sql="select * from sanpham sp, loaisanpham lsp where sp.id_danhmuc=lsp.id_loaisanpham and id_loaisanpham=".$_REQUEST["cateid"];
							$result=DataProvider::ExecuteQuery($sql);
							while($row=mysql_fetch_array($result))
							{
								if($row["data-filter"]!=NULL)
								{
					?>
                <figure class="<?php echo $row["data-filter"]?>"> <a href="detail.php?id=<?php echo $row["id_sanpham"]?>" class="thumb"><img src="img/sanpham/<?php echo trim($row["hinhsanpham"]);?>" alt="alt" /></a>
                  <figcaption> <a href="detail.php?id=<?php echo $row["id_sanpham"]?>" >
                    <h3><?php echo $row["tensanpham"];?></h3>
                    </a> <br>
                    Tình trạng:
                    <?php if($row["tinhtrang"]==1){echo "Còn hàng";}else {echo "Hết hàng";}?>
                  </figcaption>
                </figure>
                <?php }}?>
              </div>
              <!-- ENDS Filter container -->
            </div>
            <!-- ENDS featured -->
          </div>
          <!-- ENDS WRAPPER -->
        </div>
        <!-- ENDS MAIN -->
		<!-- InstanceEndEditable -->
		<!-- BEGINS FOOTER -->
   

<?php
include_once("footer.php");
?>
<!-- ENDS FOOTER -->

	</body>



<!-- InstanceEnd --></html>